home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / shm_limits.h.z / shm_limits.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.4 KB  |  84 lines

  1. /* $Id: shm_limits.h,v 1.13 1999/02/23 11:43:17 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_SHM_LIMITS_H__
  25. #define __GLIBTOP_SHM_LIMITS_H__
  26.  
  27. #include <glibtop.h>
  28. #include <glibtop/global.h>
  29.  
  30. BEGIN_LIBGTOP_DECLS
  31.  
  32. #define GLIBTOP_IPC_SHMMAX    0
  33. #define GLIBTOP_IPC_SHMMIN    1
  34. #define GLIBTOP_IPC_SHMMNI    2
  35. #define GLIBTOP_IPC_SHMSEG    3
  36. #define GLIBTOP_IPC_SHMALL    4
  37.  
  38. #define GLIBTOP_MAX_SHM_LIMITS    5
  39.  
  40. typedef struct _glibtop_shm_limits    glibtop_shm_limits;
  41.  
  42. struct _glibtop_shm_limits
  43. {
  44.     u_int64_t    flags,
  45.         shmmax,        /* GLIBTOP_IPC_SHMMAX    */
  46.         shmmin,        /* GLIBTOP_IPC_SHMMIN    */
  47.         shmmni,        /* GLIBTOP_IPC_SHMMNI    */
  48.         shmseg,        /* GLIBTOP_IPC_SHMSEG    */
  49.         shmall;        /* GLIBTOP_IPC_SHMALL    */
  50. };
  51.  
  52. #define glibtop_get_shm_limits(shm)    glibtop_get_shm_limits_l(glibtop_global_server, shm)
  53.  
  54. #if GLIBTOP_SUID_SHM_LIMITS
  55. #define glibtop_get_shm_limits_r    glibtop_get_shm_limits_p
  56. #else
  57. #define glibtop_get_shm_limits_r    glibtop_get_shm_limits_s
  58. #endif
  59.  
  60. void glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf);
  61.  
  62. #if GLIBTOP_SUID_SHM_LIMITS
  63. void glibtop_init_shm_limits_p (glibtop *server);
  64. void glibtop_get_shm_limits_p (glibtop *, glibtop_shm_limits *buf);
  65. #else
  66. void glibtop_init_shm_limits_s (glibtop *server);
  67. void glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf);
  68. #endif
  69.  
  70. #ifdef GLIBTOP_NAMES
  71.  
  72. /* You need to link with -lgtop_names to get this stuff here. */
  73.  
  74. extern const char *glibtop_names_shm_limits [];
  75. extern const unsigned glibtop_types_shm_limits [];
  76. extern const char *glibtop_labels_shm_limits [];
  77. extern const char *glibtop_descriptions_shm_limits [];
  78.  
  79. #endif
  80.  
  81. END_LIBGTOP_DECLS
  82.  
  83. #endif
  84.